//
//  TestBGFMModel.swift
//  CooperSwift_Example
//
//  Created by 计海峰 on 2021/4/28.
//  Copyright © 2021 CocoaPods. All rights reserved.
//

import Foundation
import Cooper_BGFMDB

class TestBGFMDBSqliteModel: NSObject {
    @objc var id:Int = 0
    @objc var one_id:Int = 0
    @objc var name:String?
    @objc var model:TestBGFMDBSqliteModel?
    @objc var gender:String?
    
    override class func bg_uniqueKeys() -> [Any] {
        return ["id"]
    }
    
    override class func bg_propertyNameTypesForCustomClass() -> [AnyHashable : Any] {
        return ["id": "NSNumber", "one_id": "NSNumber", "model": "TestBGFMDBSqliteModel"]
    }
    
    static func testMirror() {
        let mirror = Mirror(reflecting: TestBGFMDBSqliteModel())
        //接下来遍历&nbsp;children&nbsp;属性，这是⼀个集合
        for pro in mirror.children {
            //然后我们可以直接通过&nbsp;label&nbsp;输出当前的名称，value&nbsp;输出当前反射的值
            print("\(pro.label) : \(pro.value)")
        }
    }
    
}
